package idl

const (
	REGULAR_USER = "regular_user"
	ADMIN        = "admin"
	SUPER_ADMIN  = "super_admin"
)

const (
	NONE = "None"
	OWM  = "Owm"
	ALL  = "All"
)

type User struct {
	Uid int64  `json:"uid" binding:"required" mapstructure:"uid,omitempty"` //学号or教职工编号
	Pwd string `json:"pwd" binding:"required" mapstructure:"pwd,omitempty"`

	Nick string `json:"nick" mapstructure:"nick,omitempty"`
	Mail string `json:"mail" mapstructure:"mail,omitempty"`
	//Motto string `json:"motto,omitempty"`

	AdminType string `json:"admin_type" mapstructure:"admin_type,omitempty"`
	Major     string `json:"major" mapstructure:"major,omitempty"`

	SolveCount  int `json:"solve_count" mapstructure:"solve_count,omitempty"`
	SubmitCount int `json:"submit_count" mapstructure:"submit_count,omitempty"`

	Status     int    `json:"status" mapstructure:"status,omitempty"` //admin,down,contest
	CreateTime int64  `json:"create_time" xorm:"created" mapstructure:"create_time,omitempty"`
	UpdateTime int64  `json:"update_time" xorm:"updated" mapstructure:"update_time,omitempty"`
	LastTime   int64  `json:"last_time" mapstructure:"last_time,omitempty"`
	LastIPAddr string `json:"last_ip_addr" mapstructure:"last_ip_addr,omitempty"` //记录ip地址
	TimeRecord int64  `json:"time_record" mapstructure:"time_record,omitempty"`

	IsDisabled bool `json:"is_disabled" mapstructure:"is_disabled,omitempty"`
}

type LoginRequest struct {
}
